<?php
/**
 * GeryEngine
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this release in the file LICENSE
 *
 * @copyright  Copyright (c) 2007 Arjen Brouwer
 * @license    New BSD License
 * @author     Arjen Brouwer
 */

class GeryBoolean extends GeryBaseType {
	
	public function negate($val, $parameters) {
		return ! $val;
	}
	
	public function to_s($val) {
		return ($val) ? 'true' : 'false';
	}
	
	public function to_i($val) {
		return ($val) ? 1 : 0;
	}
}
?>